package cn.chinaflame.pagodas.repository;

import cn.chinaflame.pagodas.entity.Boy;
import cn.chinaflame.pagodas.entity.PaBadLights;
import cn.chinaflame.pagodas.entity.PaEmailLog;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * 继承springdataJpa
 *
 * @author admin
 */
public interface PaEmailLogRepository extends JpaRepository<PaEmailLog, Integer> {
	
	/**
	 * 
	 * @param log
	 * @return
	 */
//	public int addEmailLog(PaEmailLog log);
	/**
	 * 通过日期查询
	 * @param date
	 * @return
	 */
    public List<PaEmailLog> findByCreatetime(String date);
    
    /**
     * 通过主题查询
     * @param subject
     * @return
     */
    public List<PaEmailLog> findBySubject(String subject);
    
    /**
     * 通过收件人查询
     * @param receiver
     * @return
     */
    public List<PaEmailLog> findByReceiver(String receiver);
    
    /**
     * 通过发送结果查询
     * @param result
     * @return
     */
    public List<PaEmailLog> findByResult(String result);
    
    /**
     * 通过抄送人查询
     * @param result
     * @return
     */
    public List<PaEmailLog> findByCopyto(String result); 
}
